﻿@{
    ViewBag.Title = "GetTemplate";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<link href="/CSS/cosmic.css" rel="stylesheet" type="text/css" />

<h2>Get Template</h2>

<div id="cosmic_main"> </div>

@Html.Partial("~/Views/Shared/_Template.cshtml")

<script type="text/javascript">
    $(document).ready(function () {
        listCosmics();
    });

    function listCosmics() {
        var url = "/Cosmic/MockCosmics";
        
        $.ajax({
            url: url,
            type: "Get",
            dataType: "json",
            success: function (data) {
                $('#cosmic-view2').tmpl(data).appendTo('#cosmic_main');
            }
        });
    }
</script>
